<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container{
            width:500px;
            height: 500px;
            border:1px solid red;
        }
        .wrap{
            width:400px;
            height: 400px;
            border:1px solid blue;
        }
        .wrap > div{
            width:100px;
            height: 100px;
            border:1px solid green;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="wrap">
            <div>div1</div>
            <div>div2</div>
            <div>div3</div>
        </div>
    </div>
    <script>
        var container=document.querySelector(".container");
        container.onclick=function(e){
            console.log(e.target);
        };  
    </script>
</body>
</html>